package com.ys.code.generator.core.vo;

import java.util.List;
import java.util.Map;

import org.apache.commons.lang.StringUtils;

import com.ys.code.generator.core.jdbc.ColumnField;

public class BaseInfo {
	private String createTime;
	private String author;
	private List<ColumnField> columnFieldList; // 字段
	private String subModel;
	private String companyName; // 公司名称
	private String tableName; // 表名
	private String projectName; // 项目名称
	private String model; // 模块名称
	private String objectNameCn; // 类的中文名称
	private String objectName; // 类名
	private String fLowerObjectName; // 类名首字母小写
	private String abbObjectName; // 类的简写
	private String[] primaryKeys; // 主键: 如property_value和property_value_id为共同的主键;
	private String[] primaryKeysConvert; // 主键转换后：如property_value和property_value_id为共同的主键这里转换后为 propertyValue和PropertyValueId;
	private String primaryKeyMerger; // 主键合并后首字母大写
	private String primaryKeyMergerFLower; //主键合并后首字母小写
	private Map<String,String> parameters; //自定义的参数 ：key参数名称，value参数的值
	private Map<String,String> templates; //自定义模板：key模板路径，value生成文件的输出路径

	// ********零时变量s*********
	private String driver;
	private String url;
	private String userName;
	private String password;
	// ********零时变量e*********

	public String getCreateTime() {
		return this.createTime;
	}

	public Map<String, String> getParameters() {
		return parameters;
	}

	public void setParameters(Map<String, String> parameters) {
		this.parameters = parameters;
	}

	public Map<String, String> getTemplates() {
		return templates;
	}

	public void setTemplates(Map<String, String> templates) {
		this.templates = templates;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}

	public String getAuthor() {
		return this.author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

	public String getModel() {
		return this.model;
	}

	public void setModel(String model) {
		this.model = model;
	}

	public String getTableName() {
		return this.tableName;
	}

	public void setTableName(String tableName) {
		this.tableName = tableName;
	}

	public String getSubModel() {
		return StringUtils.uncapitalize(this.objectName);
	}

	public String getObjectName() {
		return this.objectName;
	}

	public void setObjectName(String objectName) {
		this.objectName = objectName;
	}

	public String getfLowerObjectName() {
		return this.fLowerObjectName;
	}

	public void setfLowerObjectName(String fLowerObjectName) {
		if (fLowerObjectName == null || fLowerObjectName == "" || (fLowerObjectName + "*").equals("*")) {
			this.fLowerObjectName = StringUtils.uncapitalize(this.objectName);// 第一个字母小写
		} else {
			this.fLowerObjectName = fLowerObjectName;
		}
	}

	public List<ColumnField> getColumnFieldList() {
		return this.columnFieldList;
	}

	public void setColumnFieldList(List<ColumnField> columnFieldList) {
		this.columnFieldList = columnFieldList;
	}

	public String getAbbObjectName() {
		return abbObjectName;
	}

	public void setAbbObjectName(String abbObjectName) {
		this.abbObjectName = abbObjectName;
	}

	public String getProjectName() {
		return projectName;
	}

	public void setProjectName(String projectName) {
		this.projectName = projectName;
	}

	public String getObjectNameCn() {
		return objectNameCn;
	}

	public void setObjectNameCn(String objectNameCn) {
		this.objectNameCn = objectNameCn;
	}

	public String getCompanyName() {
		return companyName;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}

	public String getDriver() {
		return driver;
	}

	public void setDriver(String driver) {
		this.driver = driver;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public void setSubModel(String subModel) {
		this.subModel = subModel;
	}

	public String getPrimaryKeyMerger() {
		return primaryKeyMerger;
	}

	public void setPrimaryKeyMerger(String primaryKeyMerger) {
		if (StringUtils.isNotBlank(primaryKeyMerger)) {
			this.primaryKeyMerger = StringUtils.capitalize(primaryKeyMerger); // 首字母大写
		} else
			this.primaryKeyMerger = primaryKeyMerger;
	}

	public String getPrimaryKeyMergerFLower() {
		return primaryKeyMergerFLower;
	}

	public void setPrimaryKeyMergerFLower(String primaryKeyMergerFLower) {
		this.primaryKeyMergerFLower = primaryKeyMergerFLower;
	}

	public String[] getPrimaryKeys() {
		return primaryKeys;
	}

	public void setPrimaryKeys(String[] primaryKeys) {
		this.primaryKeys = primaryKeys;
	}

	public String[] getPrimaryKeysConvert() {
		return primaryKeysConvert;
	}

	public void setPrimaryKeysConvert(String[] primaryKeysConvert) {
		this.primaryKeysConvert = primaryKeysConvert;
	}
	
	
}